//
//  joinScreenModel.m
//  YuTang
//
//  Created by 葛悦彣 on 2024/8/21.
//

#import "joinScreenModel.h"

@implementation joinScreenModel


- (NSMutableDictionary *)SSDict{
    NSMutableDictionary * dict = [NSMutableDictionary dictionary];
    if(self.type != 0){
        [dict setObject:@(self.type) forKey:@"type"];
    }
    if(self.startTime.length > 0){
        [dict setObject:self.startTime forKey:@"startTime"];
        [dict setObject:self.endTime forKey:@"endTime"];
    } else {
        [dict setObject:self.createTime forKey:@"createTime"];
    }
    [dict setObject:self.pondId forKey:@"pondId"];
    [dict setObject:self.pondTissueId forKey:@"pondTissueId"];
    [dict setObject:self.userName forKey:@"userName"];
    [dict setObject:self.handover forKey:@"handover"];
    [dict setObject:self.queryParam forKey:@"queryParam"];

    return dict;
}
- (NSMutableDictionary *)SHDict{
    NSMutableDictionary * dict = [NSMutableDictionary dictionary];
    if(self.status != 0){
        [dict setObject:@(self.status) forKey:@"status"];
    }
    if(self.applyType != 0){
        [dict setObject:@(self.applyType) forKey:@"applyType"];
    }
    
    if(self.startTime.length > 0){
        [dict setObject:self.startTime forKey:@"startTime"];
        [dict setObject:self.endTime forKey:@"endTime"];
    } else {
        [dict setObject:self.createTime forKey:@"createTime"];
    }
    [dict setObject:self.queryParam forKey:@"queryParam"];

    return dict;
}
- (NSMutableDictionary *)GJDict{
    NSMutableDictionary * dict = [NSMutableDictionary dictionary];
    if(self.status != -1){///-1是全部
        [dict setObject:@(self.status) forKey:@"status"];
    }
    if(self.alarmDegree != -1){///-1是全部
        [dict setObject:@(self.alarmDegree) forKey:@"alarmDegree"];
    }
    return dict;
}
- (BOOL)isNew{
    if(self.startTime.length > 0){
        return NO;
    }
    if(self.endTime.length > 0){
        return NO;
    }
    if(self.pondId.length > 0){
        return NO;
    }
    if(self.pondTissueId.length > 0){
        return NO;
    }
    if(self.userName.length > 0){
        return NO;
    }
    if(self.handover.length > 0){
        return NO;
    }
    return YES;
}
@end
